SETCC is a small utility application for the CC5X/CC8E compilers. Version 2.4, Copyright (c) B Knudsen Data - Trondheim, Norway, 2020 - 2024. The SETCC utility is available only for licensed editions. SETCC is useful for: a) Generating device specific header files b) Setting config symbols for a device c) Compiling projects Reasons for generating header files using SETCC: - predefined header files may not be ready yet for new devices - the number of register symbols can be selected - the bit name format can be selected - the register and bit names are generated according to the INI and CFGDATA files supplied by Microchip as found in MPLAB X. The device header files supplied with the compiler can alternatively be used instead of generating new header files for each project. However, the supplied header files contains less bit symbols compared to header files generated by SETCC. *** LIMITATIONS: SETCC will use the INI and CFGDATA files found in the MPLAB X package. Header files can be created for PIC18F and PIC18LF devices including the enhanced PIC18 parts with 16k RAM and interrupt vector tables. ==> NOT supported: PIC18FxxJxx. Header files can be created for the enhanced 14 bit core devices (PIC1xF1xxx and PIC1xLF1xxx). ==> NOT supported: Legacy 14 bit core and 12 bit core devices. *** SYSTEM REQUIREMENTS: SETCC is a GUI (graphical user interface) application using 32 bit processing and runs on PC compatible machines using Microsoft Windows. It is required to install MPLAB X in order to generate header files, because the required INI and CFGDATA files are read from the MPLAB X installation. *** SETUP: Main button allows new projects to be created and existing projects to be loaded. : Define a new project. : Shows the current project loaded. : Opens an exising project by loading the project file. Defining or loading a project will change the active directory to the folder where the project file is stored. For each project a project file 'setcc.pxk' is created and maintained. The project file allows SETCC to be terminated and restarted later without state loss. File 'setcc.pxk' contains: a) Device definition b) Optional path to MPLAB X c) Full path to the compiler d) Full path to the device header file used by the project e) Information on config settings for each project edition f) Full path to the source file for storing config settings g) Information on compiler options for each project edition h) Full path to the main C project file File 'setcc.pxk' can be overwritten by a new project definition and also deleted manually. *** HEADER: Main button
allows the device header file for the project to be defined. : Create a header file based on INI and CFGDATA files in MPLAB X. : Shows the file name of the selected or created header file. : A header file could be available in a nearby folder. : The header file supplied with compiler can be used. Create Options: - include all alternative register names (defined in INI file) - include bit names - include alternative bit names (defined in INI file) - include all enumerated bit names - convert bit names on format NOT_NNN and nNNN to NNN_ a) long bit name format: REGISTERNAME_BITNAME b) short bit name format: BITNAME - limited set only c) combined bit name format: BITNAME / REGISTERNAME_BITNAME Note that creating or defining a header file in SETCC does not always include this file in the source code automatically. For header files residing outside the compiler folder or outside the active project folder it will be required to ensure that the header file in included (preferably by option -I). Creating a header file has several options. It is recommended to try the alternative settings and create and inspect the header file several times until the register and bit settings are set according to the desired preferences. *** CONFIG: Main button allows device configurations to be defined and maintained. Before changing the config settings it is required to define a project edition. Up to 5 editions can be defined, for example one for Production and one for Debugging. The project editions will appear as separate buttons. Individual config settings can be changed by clicking on the right config symbol and selecting one of the alternatives that pops up. It is required to write the config settings to a source file in order to include them in the compiled code. SETCC will update existing source code settings in case the device configuration need to be changed. Note that SETCC will not read any config settings in the source file but instead use the settings stored in the project file 'setcc.pxk'. It is therefore recommended to change the device configuration using SETCC. *** BUILD: Main button allows SETCC to perform a project compilation. Before compiling the project it is required to define a project edition. Up to 5 editions can be defined, for example one for Production and one for Debugging. The project editions will appear as separate buttons. : Starts the compilation. Compiler options can be added by clicking on the right option in the list of options. The list of options can also be edited directly. This is required for some options, for example when adding a file name, a path or a symbol. Editing is also required when removing options.